home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / Kibitz / ! read.me next >
Encoding:
Text File  |  1994-05-06  |  6.0 KB  |  125 lines  |  [TEXT/MPS ]

  1. KIBITZ:  The Why and How.
  2.  
  3. As a alternative kind of sample, we here in DTS did a complete application.
  4. Granted, a game is by no means as complete an application as you dudes out
  5. there write, but at least the same kinds of issues are addressed.
  6.  
  7. With an application this size, structure becomes important.  You will note a
  8. good number of source files.  Hopefully, I have broken the code up into logical
  9. enough pieces that finding a piece of code is no problem.
  10.  
  11. As I wrote this sample, I tried to fully address development areas as they came
  12. up.  Thre is a file I/O unit, which is rather general in structure.  Hopefully
  13. this code can be useful as it currently stands.  (If it isn't, then I did
  14. something wrong.)
  15.  
  16. Along with the file I/O unit, I wrote a TextEdit control.  This was done so
  17. that TextEdit items could easily be put into non-dialog windows.  The same
  18. philosophy behind the file I/O unit was applied to the TextEdit control.  Now
  19. that the TextEdit control is complete, it (hopefully) will be easier for
  20. developers to add TextEdit items to non-dialog windows.
  21.  
  22. Of course, I am looking for suggestions as to how to make these units more
  23. general and useful.  Any suggestions are welcome.
  24.  
  25.  
  26. As you are most probably aware, DTS shut down for three weeks so that we could
  27. learn 7.0, write sample code, and stuff like that.  I would like to take some
  28. read.me space to thank you for your patience during this period.  Hopefully,
  29. you will agree that it was time well spent.
  30.  
  31.  
  32. Now to the application itself:
  33.  
  34. First, I would like to explain why I did a chess game.  I was assigned to 
  35. write sample code for the AppleEvents part of 7.0.  Keith Rollin had been doing
  36. AppleEvents stuff up to the shutdown, and you will see a good amount of his
  37. work in this sample.
  38.  
  39. Just before the shutdown, and for the first week of the shutdown, we were to
  40. determine what our sample would be.  Since I hardly knew the Mac, didn't know
  41. the first thing about 7.0, and probably less about AppleEvents, I spent a lot
  42. of time learning, and not much time deciding what my sample should be.
  43.  
  44. This situation was getting a bit desperate, since we were supposed to announce
  45. what our sample was going to be in a matter of days.  Around this time, Keith
  46. bailed me out by giving me the idea of a chess game using AppleEvents.  I
  47. immediately liked the idea for two reasons.  The first is that is was a cool
  48. idea.  The second was that I hadn't thought of a darn thing myself, so this
  49. idea was better than facing my DTS peers with a comment like:  "Gee, I, uh,
  50. well, I don't have an idea.  My brain's gone."
  51.  
  52. So, chess it was.
  53.  
  54.  
  55. I used to play a lot of chess in my younger days.  In trying to come up with a
  56. theme for this chess application, I thought back to what really annoyed me
  57. when I was playing chess.  The most annoying thing was the kibitzer who would
  58. just not go away, and would string on endless comments.  It seemed like a
  59. natural theme for my game.  It is a good Yiddish word, plus it offered the
  60. opportunity to send more AppleEvents messages than just chess moves.
  61.  
  62. So, as a design specification, I made sure that there was no way for the player
  63. to get rid of the message (other than quitting the game) from the other player.
  64. This adds a touch of realism that true chess players should appreciate.
  65.  
  66. The full design specification has not been implemented for this version, but
  67. may be implemented for future versions.  As a suggestion from Keith Rollin,
  68. I would like to put in some sort of challenge board or automatic rating system.
  69. (USCF rating system, maybe.)  Guillermo Ortiz would like a spectator mode where
  70. you can hook up to a game in progress and send messages to the players.  (You
  71. wouldn't be able to make any moves, but you could annoy the heck out of the
  72. players.  And of course, there would be no way that the players can make you
  73. stop sending messages.  Ah, that touch of realism again!)
  74.  
  75. What is in this version is a reasonably complete first pass at an application.
  76. It is fully functional, and seems to be rather solid, although we are calling
  77. it Beta software at this point.
  78.  
  79. There is a good amount of code in Kibitz that isn't necessary in terms of a
  80. standard DTS sample project, but I couldn't help myself.  Checking for legal
  81. moves, for example.  I couldn't handle the idea of somebody making illegal
  82. moves with my software.  I just had to check to see if the move was legal.
  83. When reviewing the sample code, you can just ignore this code.  I put all the
  84. chess-specific code in a single file to make it easier to ignore.  I think you
  85. will agree however, that I didn't spend too much time getting the computer to
  86. play good chess.  (Maybe next version...)
  87.  
  88.  
  89.  
  90. At this point, I would like to thank a number of people for their
  91. contributions.  These folk are:
  92.  
  93. Keith Rollin, who had the original idea, did the ground-breaking work for
  94. AppleEvents, put up with many questions from me, did the Traffic Light 2.0
  95. sample which I modified to form ShellApp which I used as the basis for my
  96. sample, did code review, etc., etc., etc.  (Is a thank-you enough?)
  97.  
  98. Pete Helme, who got parts of the AppleEvents stuff to work when I couldn't.
  99.  
  100. Forrest Tanaka, who made sure that I wasn't doing brain-dead things with
  101. TextEdit.  Pointers from him were most helpful.  (It could have been
  102. embarrasing for me if he didn't steer me right.)
  103.  
  104. Guillermo Ortiz, who made numerous human-interface suggestions that really
  105. improved the smoothness of the game, as well as various suggestions (as yet
  106. to be implemented) for features.
  107.  
  108. Dave Radcliffe, who made sure that various segments of my code were legible.
  109.  
  110. Bryan Stearns, whose TESample I used as a basis for my TextEdit control.
  111.  
  112. John Harvey, who answered questions of any topic, independent of whether or
  113. not it was a stupid question.
  114.  
  115. John Sullivan, who is a human-interface guy who had a lot of good advice.
  116. (If you like the slider and the real-time update, even across the network,
  117. thank him.  He shamed me into it.)
  118.  
  119. There were, of course, numerous other people as well, who gave me comments,
  120. played me games to test the thing, and development stuff like that.  (Thanks.)
  121.  
  122.  
  123.  
  124. Eric Soldan
  125.